package com.wanqing.community.manager;

import java.util.List;
import java.util.Map;

import com.wanqing.community.bean.MenuBean;
import com.wanqing.community.bean.MenuOperateBean;
import com.wanqing.community.util.CommunityException;
import com.wanqing.community.util.ConditionParse;
import com.wanqing.community.bean.JsonTree;

/**
 * 菜单管理业务接口
 */
public interface MenuManager {
	
	/**
	 * <p>Description:根据条件得到菜单的数量<p>
	 * <p>modifiContent:<p>
	 * @param condParse
	 * @return
	 * @throws CommunityException
	 */
	int getMenuCount(ConditionParse condParse) throws CommunityException;
	
	/**
	 * <p>Description:根据查询条件查询菜单列表<p>
	 * <p>modifiContent:<p>
	 * @param condParse
	 * @return
	 * @throws CommunityException
	 */
	List<MenuBean> queryMenu(ConditionParse condParse) throws CommunityException;
	
	/**
	 * <p>Description:查询菜单数据产生extjs的导航菜单<p>
	 * <p>modifiContent:<p>
	 * @param condParse
	 * @return
	 */
	List<JsonTree> queryNavigationMenu(ConditionParse condParse);
	
	/**
	 * <p>Description:添加菜单<p>
	 * <p>modifiContent:<p>
	 * @param menuBean
	 * @return
	 * @throws CommunityException
	 */
	boolean addMenu(MenuBean menuBean) throws CommunityException;
	
	/**
	 * <p>Description:修改菜单信息<p>
	 * <p>modifiContent:<p>
	 * @param menu
	 * @return
	 * @throws CommunityException
	 */
	boolean updateMenu(MenuBean menu) throws CommunityException;
	
	/**
	 * <p>Description:删除菜单<p>
	 * <p>modifiContent:<p>
	 * @param list
	 * @return
	 * @throws CommunityException
	 */
	boolean deleteMenu(List<String> list) throws CommunityException;	
	
	/**
	 * <p>Description:查询所有的权限菜单菜单信息<p>
	 * <p>modifiContent:<p>
	 * @param roleId 角色ID
	 * @return
	 * @throws CommunityException
	 */
	List<MenuBean> queryAclMenu(String[] roleIds) throws CommunityException;	
	
	Map<String, List<MenuOperateBean>> queryFuncOperate(String roleId) throws CommunityException;
	
	Map<String, List<MenuOperateBean>> queryBuisOperate(String roleId) throws CommunityException;
		
	/**
	 * <p>Description:通过ID查找菜单信息<p>
	 * <p>modifiContent:<p>
	 * @param id
	 * @return
	 * @throws CommunityException
	 */
	MenuBean findMenuById(String id) throws CommunityException;
	
	/**
	 * <p>Description:分页查询菜单信息<p>
	 * <p>modifiContent:<p>
	 * @param condParse
	 * @param currPage 当前页
	 * @param pageSize 每页显示的记录数
	 * @return
	 * @throws CommunityException
	 */
	List<MenuBean> queryMenu(ConditionParse condParse, int currPage,int pageSize) throws CommunityException;
	
	/**
	 * <p>Description:查询菜单对应的操作功能<p>
	 * <p>modifiContent:<p>
	 * @param condParse
	 * @return
	 * @throws CommunityException
	 */
	List<MenuOperateBean> querMenuOperate(ConditionParse condParse) throws CommunityException;
	
	/**
	 * <p>Description:查询所有的菜单以及对应的按钮，业务功能<p>
	 * <p>modifiContent:<p>
	 * @return
	 */
	List<MenuBean> listAuthorMenu();
	
	/**
	 * <p>Description:删除子菜单<p>
	 * <p>modifiContent:<p>
	 * @param list
	 * @return
	 * @throws CommunityException
	 */
	boolean deleteMenuOperate(String menuId) throws CommunityException;	
	
}
